﻿namespace Athena.Codec.Implementations
{
    public class JsonRpcMessageCodecFactory : IRpcMessageCodecFactory
    {
        private IRpcMessageEncoder _rpcMessageEncoder;
        private IRpcMessageDecoder _rpcMessageDecoder;
        public JsonRpcMessageCodecFactory()
        {
            _rpcMessageEncoder = new JsonRpcMessageEncoder();
            _rpcMessageDecoder = new JsonRpcMessageDecoder();
        }

        public IRpcMessageDecoder CreateDecoder()
        {
            return _rpcMessageDecoder;
        }

        public IRpcMessageEncoder CreateEncoder()
        {
            return _rpcMessageEncoder;
        }
    }
}
